Xbasic

FIELD.LINK_TYPE_GET Function

Syntax

C Link_Type_get()

Description

Returns type of link if field is a linking key, blank if field is not a linking key.

Discussion

The .LINK_TYPE_GET() method returns the type of set link that the field represents.

The following illustration shows the structure of the invoice set.

images/ug_Invoice_Set_Structure.gif

The following example shows that in the invoice set the customer_id field is a linking field that connects the customer table one-to-one ("First") to the invoice_header table. The invoice_number field links the invoice_items table many-to-one ("Many") to the invoice_header table.

dim tbl as P
dim fld as P
tbl = table.open("invoice.set")
fld = tbl.field_get("customer_id")
? fld.link_table_get()
= "CUSTOMER"
? fld.link_type_get()
= "First"
fld = tbl.field_get("invoice_number")
? fld.link_table_get()
= "INVOICE_ITEMS"
? fld.link_type_get()
= "Many"

See Also